repo.or.cz
/
andmenj-acm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Namespacing everything to /UVa.
[andmenj-acm.git]
/
UVa
/
11000 - Bee
/
11000.cpp
blob
2a2a5e76c177be564a40dffb16007f4eca568c34
1
using namespace
std
;
2
#include <iostream>
3
#include <vector>
4
5
const long long
limit
= (
1LL
<<
32
) +
2
;
6
vector
<
long long
>
m
;
7
8
int
main
(){
9
m
.
push_back
(
0
);
10
m
.
push_back
(
1
);
11
for
(
int
i
=
2
;
m
[
i
-
1
] +
m
[
i
-
2
] <=
limit
; ++
i
)
12
m
.
push_back
(
m
[
i
-
1
] +
m
[
i
-
2
] +
1
);
13
14
int
n
;
15
while
(
scanf
(
"%d"
, &
n
)==
1
&&
n
!=-
1
)
16
printf
(
"%lld %lld
\n
"
,
m
[
n
],
m
[
n
+
1
]);
17
18
return
0
;
19
}